package API004;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.function.Consumer;

public class lambdaDemo3 {
    public static void main(String[] args) {
        Collection<String> coll = new ArrayList<>();
        coll.add("Lisi");coll.add("wangwu");coll.add("laoliu");
        coll.forEach(new Consumer<String>(){
            @Override
            public void accept(String t){
                System.out.println(t);
            }
        });
        coll.forEach(t -> System.out.println(t));
    }
}
